﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNet.Data;
using DotNet.Model;
using System.Data;

namespace DotNet.Business
{
    public class jobBll
    {
        jobDal jDal = new jobDal();
        #region 是否存在该记录
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int jobId)
        {
            return jDal.Exists(jobId);
        }
        #endregion

        #region 获得招聘信息列表
        /// <summary>
        /// 获得招聘信息列表
        /// </summary>
        /// <returns></returns>
        public IList<job> GetModel()
        {
            return jDal.GetModel();
        }
        #endregion

        #region 根据招聘信息号查询实体
        /// <summary>
        /// 根据招聘信息号查询实体
        /// </summary>
        /// <param name="jobId"></param>
        /// <returns></returns>
        public job GetModel(int jobId)
        {
            return jDal.GetModel(jobId);
        }
        #endregion

        #region 修改招聘信息信息
        /// <summary>
        /// 修改招聘信息信息
        /// </summary>
        /// <param name="job"></param>
        /// <returns></returns>
        public bool Update(job job)
        {
            return jDal.Update(job);
        }
        #endregion

        #region 删除招聘信息根据招聘信息号
        /// <summary>
        /// 删除招聘信息根据招聘信息号
        /// </summary>
        /// <param name="jobId"></param>
        /// <returns></returns>
        public bool Delete(int jobId)
        {
            return jDal.Delete(jobId);
        }
        #endregion

        #region 添加招聘信息
        /// <summary>
        /// 添加招聘信息
        /// </summary>
        /// <param name="job"></param>
        /// <returns></returns>
        public bool Insert(job job)
        {
            return jDal.Insert(job);
        }
        #endregion

        #region 招聘分页
        /// <summary>
        /// 招聘分页
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public DataTable pageingForJob(int pageIndex,int pageSize)
        {
            return jDal.pageingForJob(pageIndex, pageSize);
        }
        #endregion

        #region 获得招聘数量
        /// <summary>
        /// 获得招聘数量
        /// </summary>
        /// <returns></returns>
        public int getRecordCount() 
        {
            return jDal.getRecordCount();
        }
        #endregion
    }
}
